package oppsa.controller;


//Variables
public class SSComponent {
	private int sequence;
	private String ssComponentName;
	private int subsystemSequence;
	
	public SSComponent() {
		this.sequence = 0;
		this.ssComponentName = "";
		this.subsystemSequence = 0;
	}
	
	public SSComponent(int sequence,
			String ssComponentName, int subsystemSequence) {
		this.sequence = sequence;
		this.ssComponentName = ssComponentName;
		this.subsystemSequence = subsystemSequence;
	}
	
	public SSComponent(SSComponent ssC) {
		this.sequence = ssC.sequence;
		this.ssComponentName = ssC.ssComponentName;
		this.subsystemSequence = ssC.subsystemSequence;
	}
	
	//Getters & Setters
	public int getSequence() {
		return sequence;
	}
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}
	public String getSsComponentName() {
		return ssComponentName;
	}
	public void setSsComponentName(String ssComponentName) {
		this.ssComponentName = ssComponentName;
	}
	public int getSubsystemSequence() {
		return subsystemSequence;
	}
	public void setSubsystemSequence(int subsystemSequence) {
		this.subsystemSequence = subsystemSequence;
	}
	
	public String setSSCID(String sscName, int nbItem){
		String sscID = sscName + "-" + (nbItem+1);
		return sscID;
	}
	
	public boolean compareTo(SSComponent ssc)
	{
		
		if (this.sequence == ssc.sequence && this.ssComponentName == ssc.ssComponentName && this.subsystemSequence == ssc.subsystemSequence) {
			return true;
		}
		
		return false;
	}
}
